// pages/movie_detail/movie_detail.js
const app=getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    movie_index:'',
    movieShownDetail:[
      {
        "movie_id": 20001,
        "cat_id": 1,
        "movie_name": "满江红",
        "movie_price": "￥40起",
        "movie_score": 9.5,
        "movie_time": "159min",
        "movie_small_pic": "https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2887555071.webp",
        "movie_category": "悬疑/喜剧/剧情",
        "movie_shangying_time": "2023-01-22 09:00",
        "actor":"沈腾/易烊千玺/张译",
        "comment_num":"1221458",
        "wish":"1099999",
        "seen":"88905485",
        "like":0,
        "hasChangelike": false,
        "show_like":false,
        "collect":0,
        "hasChangecollect":false,
        "show_collect":false,
        "comment":"怒发冲冠，凭栏处！",
        "brief":"张艺谋最新高口碑悬疑喜剧感动热映中，沈腾、易烊千玺、张译、雷佳音、岳云鹏赴局探案有惊有喜，震撼演绎中国式传奇故事！南宋绍兴年间，岳飞死后四年，秦桧率兵与金国会谈。会谈前夜，金国使者死在宰相驻地，所携密信也不翼而飞。小兵张大（沈腾 饰）与亲兵营副统领孙均（易烊千玺 饰）机缘巧合被裹挟进这巨大阴谋之中，宰相秦桧（雷佳音 饰）命两人限一个时辰之内找到凶手。伴随危机四伏的深入调查，宰相府总管何立（张译 饰）、副总管武义淳（岳云鹏 饰）、舞姬瑶琴（王佳怡 饰）等人卷入局中，案件的背后似乎隐藏着一场更大的阴谋。局中有局、人心叵测，一夜之间风云变幻，各方势力暗流涌动……",
        "video":"https://vod.pipi.cn/fec9203cvodtransbj1251246104/a991dee9243791579001634520/v.f42906.mp4",
        "image_array":[
        "https://p0.pipi.cn/friday/edd3565447d775ab1b608207683c5103.jpg?imageMogr2/thumbnail/2500x2500%3E",
        "https://p0.pipi.cn/friday/edd3565447d775ab1b608207683c5103.jpg?imageMogr2/thumbnail/2500x2500%3E",
        "https://p0.pipi.cn/friday/edd3565447d775ab1b608207683c5103.jpg?imageMogr2/thumbnail/2500x2500%3E",
        "https://p0.pipi.cn/friday/edd3565447d775ab1b608207683c5103.jpg?imageMogr2/thumbnail/2500x2500%3E"
        ],
        "good_num":"976549887",
      },
      {
        "movie_id": 20002,
        "cat_id": 2,
        "movie_name": "熊出没·伴我熊“芯”",
        "movie_price": "￥40起",
        "movie_score": 9.3,
        "movie_time": "96min",
        "movie_small_pic": "https://bkimg.cdn.bcebos.com/pic/9a504fc2d5628535e5ddf8a4dfb961c6a7efcf1bc5a2?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2UyNzI=,g_7,xp_5,yp_5",
        "movie_category": "动画/喜剧/科幻",
        "movie_shangying_time": "2023-01-22 09:00",
        "actor":"秉君/谭笑/张伟/缪莹莹/贾晨露",
        "comment_num":"9894145",
        "wish":"1145675",
        "seen":"55462321",
        "brief":"一个普通的森林夜晚，对小熊大、小熊二宠爱有加的熊妈妈，在一场大火后离开了他们，两熊伤心不已……转眼多年过去，光头强带熊大熊二前往振兴岛参观机器人研究所，却意外得到了熊妈妈的线索，为此熊大、熊二一路探寻……熊妈当年为何不告而别？两熊最终是否能找到妈妈？迷雾重重的背后还有怎样的故事？一切谜团等待揭晓。",
        "video":"https://vt1.doubanio.com/202302232311/c7ce51f48376b3e6608629c09fabdb7d/view/movie/M/402990792.mp4",
        "pic1":"https://img9.doubanio.com/view/photo/sqxs/public/p2884237376.webp",
        "pic2":"https://img9.doubanio.com/view/photo/sqxs/public/p2884237374.webp",
        "pic3":"https://img2.doubanio.com/view/photo/sqxs/public/p2884237373.webp",
        "pic4":"https://img9.doubanio.com/view/photo/sqxs/public/p2885361854.webp",
        "good_num":"976549887",
      },
      {
        "movie_id": 20003,
        "cat_id": 3,
        "movie_name": "流浪地球2",
        "movie_price": "￥40起",
        "movie_score": 9.3,
        "movie_time": "173min",
        "movie_small_pic": "https://bkimg.cdn.bcebos.com/pic/9825bc315c6034a85edfa89095455e540923dd54d8de?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2UyNzI=,g_7,xp_5,yp_5",
        "movie_category": "科幻/冒险/灾难",
        "movie_shangying_time": "2023-01-22 09:00",
        "actor":"吴京/刘德华/李雪健/沙溢/宁理/",
        "comment_num":"9875674",
        "wish":"5635793",
        "seen":"354597887",
        "brief":"太阳即将毁灭，人类在地球表面建造出巨大的推进器，寻找新的家园。然而宇宙之路危机四伏，为了拯救地球，流浪地球时代的年轻人再次挺身而出，展开争分夺秒的生死之战。",
        "video":"https://vt1.doubanio.com/202302232315/829dba86b72bb9786443637d69de01a4/view/movie/M/402990927.mp4",
        "pic1":"https://img2.doubanio.com/view/photo/sqxs/public/p2886492513.webp",
        "pic2":"https://img1.doubanio.com/view/photo/sqxs/public/p2886492518.webp",
        "pic3":"https://img1.doubanio.com/view/photo/sqxs/public/p2886492517.webp",
        "pic4":"https://img9.doubanio.com/view/photo/sqxs/public/p2886547585.webp",
        "good_num":"976549887",
      },
      {
        "movie_id": 20004,
        "cat_id": 4,
        "movie_name": "深海",
        "movie_price": "￥40起",
        "movie_score": 9.1,
        "movie_time": "112min",
        "movie_small_pic": "https://bkimg.cdn.bcebos.com/pic/08f790529822720e0cf323c9499d1d46f21fbe097df3?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2U5Mg==,g_7,xp_5,yp_5",
        "movie_category": "奇幻/动画",
        "movie_shangying_time": "2023-01-22 09:00",
        "actor":"苏鑫/王亭文/滕奎兴/杨婷/吉静",
        "comment_num":"4888779",
        "wish":"5569775",
        "seen":"556679775",
        "brief":"　在大海的最深处，藏着所有秘密。一位现代少女（参宿）误入梦幻的深海世界，却因此邂逅了一段独特的生命旅程。",
        "video":"https://vt1.doubanio.com/202302232316/033451620b1bbc2b7271f6ac965a134b/view/movie/M/402990770.mp4",
        "pic1":"https://img2.doubanio.com/view/photo/sqxs/public/p2878145313.webp",
        "pic2":"https://img9.doubanio.com/view/photo/sqxs/public/p2878145324.webp",
        "pic3":"https://img1.doubanio.com/view/photo/sqxs/public/p2878231508.webp",
        "good_num":"976549887",
      },
      {
        "movie_id": 20005,
        "cat_id": 5,
        "movie_name": "中国乒乓",
        "movie_price": "￥40起",
        "movie_score": 9.4,
        "movie_time": "137min",
        "movie_small_pic": "https://img9.doubanio.com/view/photo/m/public/p2887599076.webp",
        "movie_category": "剧情/运动",
        "movie_shangying_time": "2023-02-17 09:00",
        "actor":"邓超/孙俪/许魏洲/段博文/蔡宜达",
        "comment_num":"6547889",
        "wish":"4512354",
        "seen":"78944516",
        "brief":"影片讲述在男乒被“欧洲列强”碾压的 90年代初，留洋教练戴敏佳请缨回国，带领新兵老将在天津向“列强”发起反击，拯救男乒的故事。男乒的寂寞无敌，在那传奇一夜奏响序曲。",
        "video":"https://vt1.doubanio.com/202302232318/ff522ef7ea0e24e0d5f8de2d0d43cede/view/movie/M/403000029.mp4",
        "pic1":"https://img1.doubanio.com/view/photo/sqxs/public/p2886540418.webp",
        "pic2":"https://img1.doubanio.com/view/photo/sqxs/public/p2887908687.webp",
        "pic3":"https://img9.doubanio.com/view/photo/sqxs/public/p2886540424.webp",
        "pic4":"https://img1.doubanio.com/view/photo/sqxs/public/p2887407937.webp",
        "good_num":"976549887",
      },
      {
        "movie_id": 20006,
        "cat_id": 6,
        "movie_name": "不能流泪的悲伤",
        "movie_price": "￥40起",
        "movie_score": 9.0,
        "movie_time": "97min",
        "movie_small_pic": "https://bkimg.cdn.bcebos.com/pic/c83d70cf3bc79f3df8dcfec0c3f7da11728b461083bf?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2UxMTY=,g_7,xp_5,yp_5",
        "movie_category": "爱情",
        "movie_shangying_time": "2023-02-14 09:00",
        "actor":"何蓝逗/蔡凡熙/耀庆/许光汉/左小青/",
        "comment_num":"4515513",
        "wish":"4546133",
        "seen":"48879565",
        "brief":"从青梅竹马到年少心动，赵心卉（何蓝逗 饰）和林汉聪（蔡凡熙 饰）认定彼此是携手一生的人，然而面对距离的隔阂、家庭的牵绊，以及学长陈孝名（许光汉 饰）的惊喜告白，让两人一次次走散。坚持还是放手？在心卉犹豫之时， 邻居大叔（王耀庆 饰）对爱情的笃定令她动容，她能否找回遗失的爱人，收获相伴一生的美满爱情？",
        "video":"https://vt1.doubanio.com/202302232319/0aeb46055870472c06d4f609ed41df1a/view/movie/M/403000686.mp4",
        "pic1":"https://img2.doubanio.com/view/photo/sqxs/public/p2887891023.webp",
        "pic2":"https://img1.doubanio.com/view/photo/sqxs/public/p2887737978.webp",
        "pic3":"https://img2.doubanio.com/view/photo/sqxs/public/p2888087711.webp",
        "pic4":"https://img1.doubanio.com/view/photo/sqxs/public/p2888087709.webp",
        "good_num":"976549887",
      },
      {
        "movie_id": 20007,
        "cat_id": 7,
        "movie_name": "无名",
        "movie_price": "￥40起",
        "movie_score": 9.1,
        "movie_time": "128min",
        "movie_small_pic": "https://bkimg.cdn.bcebos.com/pic/79f0f736afc379310a5537a4b792a04543a98326bbba?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2UyNzI=,g_7,xp_5,yp_5",
        "movie_category": "悬疑/动作/剧情",
        "movie_shangying_time": "2023-01-22 09:00",
        "actor":"梁朝伟 / 王一博 / 周迅 / 黄磊 / 森博之 / 大鹏 / 王传君 / 江疏影 / 张婧仪 / 周生昊 / 董易 / 古川岳史 / 彭广 / 赵左 / 高曙光 / 美浓轮泰史 / 金子浩拓 / 三浦研一 / 吴映 / 李欣 / 徐婧荧",
        "comment_num":"82927",
        "wish":"182726",
        "seen":"192726",
        "brief":"影片通过对上世纪二十年代开始奋斗在上海的中国共产党领导下的中共特科，在隐蔽战线与各方势力殊死较量过程的再现，表现了在走向胜利过程中不可或缺的党的秘密战线上那些无名英雄，他们不可取代的贡献。全面抗战爆发后，中国共产党领导的中共特科在上海周旋于重庆、汪伪、日本间谍机构之间，通过错综复杂的敌后情报系统，策反敌人，获取情报，诛杀汉奸，建立更广泛的统一战线，直至抗战胜利的前夜…... ",
        "video":"https://vt1.doubanio.com/202302232334/f87f1854679cc35f64346d9f790f50e9/view/movie/M/403000020.mp4",
        "pic1":"https://p0.ssl.img.360kuai.com/t01c386fb45c8487fcc.jpg",
        "pic2":"https://n.sinaimg.cn/sinakd20116/250/w896h1754/20211122/f267-7b2686f60a75d580fcc0f9d321e9a2c3.jpg",
        "pic3":"https://p0.ssl.qhimgs1.com/sdr/400__/t018b1b6227a2b741b4.jpg",
        "good_num":"976549887",
      },
      {
        "movie_id": 20008,
        "cat_id": 8,
        "movie_name": "阿凡达·水之道",
        "movie_price": "￥40起",
        "movie_score": 9.1,
        "movie_time": "192min",
        "movie_small_pic": "https://img9.doubanio.com/view/photo/m/public/p2884182275.webp",
        "movie_category": "科幻/动作/冒险",
        "movie_shangying_time": "2022-12-16",
        "actor":"姆·沃辛顿 / 佐伊·索尔达娜 / 西格妮·韦弗 / 史蒂芬·朗 / 克利夫·柯蒂斯 / 乔·大卫·摩尔 / 希·庞德 / 埃迪·法可 / 杰米·福雷特斯 / 吉奥瓦尼·瑞比西 / 凯特·温丝莱特 / 杰梅奈·克莱门特 / 布伦丹·考威尔 / 布里坦·道尔顿 / 特里尼蒂·布利斯 / 杰克·尚皮永 / 贝利·巴斯 / 菲利普·盖廖 / 小杜安·埃文斯 / 迪利普·劳 / 马特·杰拉德 / 科斯顿·约翰 / 凯文·多曼 / 艾丽西娅·维拉-贝利 / 肖恩·安东尼·莫兰 / 玛丽亚·沃克 / 乔尔·托贝克 / 本杰明·霍特杰斯 / 沙恩·朗吉 / 克洛伊·科尔曼 / CJ·琼斯",
        "comment_num":"82738",
        "wish":"9273930",
        "seen":"91829386",
        "brief":"影片设定在《阿凡达》的剧情落幕十余年后，讲述了萨利一家（杰克、奈蒂莉和孩子们）的故事：危机未曾消散，一家人拼尽全力彼此守护、奋力求生，并历经艰险磨难。杰克和奈蒂莉组建了家庭，他们的孩子也逐渐成长，为这个家庭带来了许多欢乐。然而危机未曾消散，萨利一家拼尽全力彼此守护、奋力求生，最终来到潘多拉星球临海的岛礁族寻求庇护。岛礁族首领特诺瓦里与罗娜尔为萨利一家提供了庇护所，这个部族的成员都是天生的潜水好手，也和海洋中的各种生物建立了密切联系。 ",
        "video":"https://vt1.doubanio.com/202302232334/5629a5782829d50c786a124b2db2d26d/view/movie/M/402970784.mp4",
        "pic1":"https://i0.hdslb.com/bfs/article/3f9a28a79a73aa866c0a34adf978b055fc580ef5.jpg",
        "pic2":"https://p0.ssl.qhimgs1.com/sdr/400__/t01d4624b3c32ecfab4.jpg",
        "pic3":"https://p2.ssl.qhimgs1.com/sdr/400__/t015bf51887274c5542.jpg",
        "good_num":"976549887",
      },
      {
        "movie_id": 20009,
        "cat_id": 9,
        "movie_name": "黑豹2",
        "movie_price": "￥40起",
        "movie_score": 8.4,
        "movie_time": "161min",
        "movie_small_pic": "https://bkimg.cdn.bcebos.com/pic/eac4b74543a98226cffc8f34dfd4ae014a90f603bdd0?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2UxODA=,g_7,xp_5,yp_5",
        "movie_category": "动作/冒险",
        "movie_shangying_time": "2023-02-07",
        "actor":"查德维克·博斯曼、迈克尔·B·乔丹、露皮塔·尼永奥、达娜·古瑞拉、马丁·弗瑞曼",
        "comment_num":"292727",
        "wish":"19387",
        "seen":"o283998",
        "brief":"在“黑豹”特查拉国王不幸去世后，苏睿（利蒂希娅·赖特 Letitia Wright 饰）、奥克耶（丹娜·奎里拉 Danai Gurira 饰）、拉曼达女王（安吉拉·贝塞特 Angela Bassett 饰）、姆巴库（温斯顿·杜克 Winston Duke 饰）为了保护瓦坎达而战。瓦坎达人努力迎接他们的新篇章，他们必须在娜吉雅（露皮塔·尼永奥 Lupita Nyong'o 饰）和罗斯探员（马丁·弗瑞曼 Martin Freeman 饰）的帮助下团结起来，为瓦坎达王国开辟新道路。 ",
        "video":"https://vt1.doubanio.com/202302232335/24bc28dd715367163d24bf20b206e15b/view/movie/M/402990871.mp4",
        "pic1":"https://img2.ali213.net/picfile/News/2019/08/25/584_2019082551197223.jpg",
        "pic2":"https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=1622125935,3494296974&fm=173&s=B20DB0449E728FD656EA0D9503001089&w=640&h=360&img.JPEG",
        "good_num":"976549887",
      },
      {
        "movie_id": 20010,
        "cat_id": 10,
        "movie_name": "交换人生",
        "movie_price": "￥40起",
        "movie_score": 8.7,
        "movie_seen": 7797030,
        "movie_time": "110min",
        "movie_small_pic": "https://img1.doubanio.com/view/photo/m/public/p2886396440.webp",
        "movie_category": "喜剧/家庭",
        "movie_shangying_time": "2023-01-22 09:00",
        "actor":"雷佳音、张小斐、张宥浩 ",
        "comment_num":"186543",
        "wish":"192727",
        "seen":"1223028",
        "brief":"仲达(雷佳音 饰)与金好(张小斐 饰)相亲时，无意间被暗恋金好的少年陆小谷(张宥浩 饰)撞见。因一次意外，陆小谷阴差阳错的与情敌仲达换了身，一场欢喜冤家的奇幻之旅正式开启……",
        "video":"https://vt1.doubanio.com/202302232335/80bce1ffbe5d3169fff1320496bea497/view/movie/M/402990393.mp4",
        "pic1":"https://inews.gtimg.com/newsapp_bt/0/15126640550/1000",
        "pic2":"https://inews.gtimg.com/newsapp_bt/0/15620456981/1000",
        "pic3":"https://inews.gtimg.com/news_bt/OwJvSkkdsV2Kd_PrQjXXbgWQRCJOvhWXg4jnXj2rP4fSMAA/1000",
        "good_num":"976549887",
      }
    ],
    movieNotDetail:[
      {
        
        "movie_id": 20004,
        "cat_id": 4,
        "movie_name": "蚁人与黄蜂女3：量子狂潮",
        "movie_price": "￥40起",
        "movie_score": 9.5,
        "movie_time": "159min",
        "movie_small_pic": "https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2887555071.webp",
        "movie_category": "悬疑/喜剧/剧情",
        "movie_shangying_time": "2023-01-22 09:00",
        "actor":"",
        "comment_num":"",
        "wish":"",
        "seen":"",
        "brief":"",
        "video":"",
        "pic1":"",
        "pic2":"",
        "pic3":"",
        "pic4":""
      },
      {
        "movie_id": 23751,
        "cat_id": 11,
        "movie_name": "毒舌律师",
        "movie_price": "￥56起",
        "movie_score": 9.6,
        "movie_time": "133min",
        "movie_small_pic": "https://n.sinaimg.cn/sinakd20230106s/0/w2000h2800/20230106/a8a8-c08ea833c807ee1088cc232cfb32431b.jpg",
        "movie_category": "剧情/喜剧",
        "movie_shangying_time": "2023-02-24 09:00",
        "actor":"",
        "comment_num":"",
        "wish":"",
        "seen":"",
        "brief":"",
        "video":"",
        "pic1":"",
        "pic2":"",
        "pic3":"",
        "pic4":""
      },
      {
        "movie_id": 24751,
        "cat_id": 12,
        "movie_name": "保你平安",
        "movie_price": "￥99起",
        "movie_score": 9.7,
        "movie_time": "112min",
        "movie_small_pic": "https://p2.ssl.qhimgs1.com/sdr/400__/t018e5a05c793350698.jpg",
        "movie_category": "剧情/喜剧",
        "movie_shangying_time": "2023-03-10 09:00",
        "actor":"",
        "comment_num":"",
        "wish":"",
        "seen":"",
        "brief":"",
        "video":"",
        "pic1":"",
        "pic2":"",
        "pic3":"",
        "pic4":""
      },
      {
        "movie_id": 45751,
        "cat_id": 13,
        "movie_name": "龙马精神",
        "movie_price": "￥39起",
        "movie_score": 8.9,
        "movie_time": "110min",
        "movie_small_pic": "https://p2.ssl.qhimgs1.com/sdr/400__/t0163490ba4da859788.jpg",
        "movie_category": "剧情/喜剧/剧情",
        "movie_shangying_time": "2023-04-07 09:00",
        "actor":"",
        "comment_num":"",
        "wish":"",
        "seen":"",
        "brief":"",
        "video":"",
        "pic1":"",
        "pic2":"",
        "pic3":"",
        "pic4":""
      },
      {
        "movie_id": 45751,
        "cat_id": 14,
        "movie_name": "龙马精神",
        "movie_price": "￥39起",
        "movie_score": 8.9,
        "movie_time": "110min",
        "movie_small_pic": "https://p2.ssl.qhimgs1.com/sdr/400__/t0163490ba4da859788.jpg",
        "movie_category": "剧情/喜剧/剧情",
        "movie_shangying_time": "2023-04-07 09:00",
        "actor":"",
        "comment_num":"",
        "wish":"",
        "seen":"",
        "brief":"",
        "video":"",
        "pic1":"",
        "pic2":"",
        "pic3":"",
        "pic4":""
      },
      {
        "movie_id": 45751,
        "cat_id": 15,
        "movie_name": "龙马精神",
        "movie_price": "￥39起",
        "movie_score": 8.9,
        "movie_time": "110min",
        "movie_small_pic": "https://p2.ssl.qhimgs1.com/sdr/400__/t0163490ba4da859788.jpg",
        "movie_category": "剧情/喜剧/动作",
        "movie_shangying_time": "2023-04-07 09:00",
        "actor":"",
        "comment_num":"",
        "wish":"",
        "seen":"",
        "brief":"",
        "video":"",
        "pic1":"",
        "pic2":"",
        "pic3":"",
        "pic4":""
      },
      {
        "movie_id": 49851,
        "cat_id": 16,
        "movie_name": "断网",
        "movie_price": "￥45起",
        "movie_score": 9.0,
        "movie_time": "110min",
        "movie_small_pic": "https://p0.ssl.qhimgs1.com/sdr/400__/t01e78d9b04294c346a.jpg",
        "movie_category": "犯罪/动作/剧情",
        "movie_shangying_time": "2023-03-03 18:00",
        "actor":"",
        "comment_num":"",
        "wish":"",
        "seen":"",
        "brief":"",
        "video":"",
        "pic1":"",
        "pic2":"",
        "pic3":"",
        "pic4":""
      },
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
    let pages  = getCurrentPages();
    let currentPage = pages[pages.length-1] ;
    let options = currentPage.options ;
    this.setData({
      movie_index: options.movie_index-1
    })

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  },
  MovieInfo:{}  , 
  //点击添加喜欢
  praiseThis(){
    //1、获取喜欢缓存中的数组
    let like = wx.getStorageSync("like")||[] ;   //获取到的为空，则将数组[]赋值给like
    //2、判断对象是否在数组中
    let index = like.findIndex(v=>v.movie_id===this.MovieInfo.movie_id);
    this.setData({
      
    });
    if(index===-1){
      like.push(this. MovieInfo)
    }
    //5、重新添加回缓存中
    wx.setStorageSync("like", like) ; 
    //6、弹窗提示
    wx.showToast({
      title: '点赞成功',
      icon: 'success' ,
      //防止手抖疯狂点击按钮，默认情况会在一段时间之后才可以再次点击按钮
      mask:true  
    })
  },
  collectThis(){
    //1、获取喜欢缓存中的数组
    let collect = wx.getStorageSync("collect")||[] ;   //获取到的为空，则将数组[]赋值给like
    //2、判断对象是否在数组中
    let index = collect.findIndex(v=>v.movie_id===this.MovieInfo.movie_id);
    this.setData({
      
    });
    if(index===-1){
      collect.push(this. MovieInfo)
    }
    //5、重新添加回缓存中
    wx.setStorageSync("collect", collect) ; 
    //6、弹窗提示
    wx.showToast({
      title: '收藏成功',
      icon: 'success' ,
      //防止手抖疯狂点击按钮，默认情况会在一段时间之后才可以再次点击按钮
      mask:true  
    })
  }

})